'use strict'

const path = require('path')

const resolve = (dir) => path.join(__dirname, dir);

module.exports = {
  publicPath:
    process.env.NODE_ENV === "production" ? "/dist/" : "/",
  configureWebpack: {
    resolve: {
      alias: {
        '@': resolve('src'),
        '@c': resolve('src/components')
      }
    }
  },
  outputDir: "dist",
  devServer: {
    proxy: {
      "/api": {
        target: "http://47.101.147.55:9091/recode",
        changeOrigin: true,
        pathRewrite: {
          "^/api": ""
        }
      }
    }
  }
}